package com.xiaochong.tir.apiservice.service;

import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.xiaochong.tir.common.data.po.ConceptCategory;
import com.xiaochong.tir.common.data.mapper.ConceptCategoryMapper;

/**
 * 此类为[基础代码]自动生成,已经拥有基本的增删改成操作 
 * <其他请自行扩展>
 * @author cx
 * @time 2018-04-26 18:38
 * 
 */
@Service
public class ConceptCategoryService{
 
      
    @Autowired
	private ConceptCategoryMapper conceptCategoryDao;
	
	
	/**
     * 新增
     * @param entity 
     * @param session
     */
    public int insertSelective (ConceptCategory entity) { 
     return this.conceptCategoryDao.insertSelective(entity);
    }	
    
    /**
     * 批量新增
     * @param list 
     * @param session
     */
    public void insertBatch(List<ConceptCategory> list) {
           
          this.conceptCategoryDao.insertBatch(list);
         
         
    }
    
    /**
     * 根据主键修改单条数据
     * @param entity 
     * @param session
     */
    public int updateByPrimaryKey(ConceptCategory entity) {
           return this.conceptCategoryDao.updateByPrimaryKey(entity);
    }
    
    /**
     * 根据主键批量修改数据
     * @param list 
     * @param session
     */
    public void updateBatch(List<ConceptCategory> list) {
           
          this.conceptCategoryDao.updateBatch(list);
          
        
    }
    
    /**
     * 根据主键查询单条数据
     * @param id
     */
    public ConceptCategory selectByPrimaryKey(Integer id) {
            return this.conceptCategoryDao.selectByPrimaryKey(id);
    }
    
    /**
     * 根据条件查询单条记录
     * @param entity 
     */
    public ConceptCategory selectByEntity(ConceptCategory entity) {
           return this.conceptCategoryDao.selectByEntity(entity);
    }
    
    
    /**
     * 根据条件查询多条记录
     * @param entity 
     */
    public List<ConceptCategory> selectByEntityList(ConceptCategory entity) {
           return  this.conceptCategoryDao.selectByEntityList(entity);
    }
    
    /**
     * 根据条件查询Id
     * @param entity 
     */
    public Integer selectById(ConceptCategory entity) {
           return  this.conceptCategoryDao.selectById(entity);
    }
    
     /**
     * 根据条件查询Ids
     * @param entity 
     */
    public List<Integer> selectByIds(ConceptCategory entity) {
        return  this.conceptCategoryDao.selectByIds(entity);
    }
    
     /**
     * 根据主键删除单条记录
     * @param id
     */
    public void deleteByPrimaryKey(Integer id) {
           this.conceptCategoryDao.deleteByPrimaryKey(id);
    }
    
    /**
     * 根据主键删除多条记录
     * @param list
     */
    public void deleteBatch(List<Integer> list) {
           this.conceptCategoryDao.deleteBatch(list);
    }
    
     /**
     * 根据某些条件删除
     * @param entity
     */
    public void deleteBatch(ConceptCategory entity) {
           this.conceptCategoryDao.deleteByEntity(entity);
    }

    /**
     * 查询所有平台货币
     * @return
     */
    public List<Map<String,Object>> selectAllEnableConceptCategory() {
        return this.conceptCategoryDao.selectAllEnableConceptCategory();
    }
}